package io.x2agent;

import java.lang.instrument.Instrumentation;

/**
 * @Author: zgl
 * @Date: 2021/1/20 19:32
 * @Description:
 */
public class X2Agent {
    private static Instrumentation instrumentation;
    private static Object lock = new Object();

    public X2Agent() {
    }

    public static Instrumentation getInstrumentation() {
        return instrumentation;
    }

    public static void agentmain(String args, Instrumentation ins) {
        synchronized (lock) {
            if (instrumentation == null) {
                instrumentation = ins;
            }
        }
    }

}
